package org.example.controller;


import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.PostConstruct;

@Slf4j
@RestController
public class LoggerController {


    public void log() {
        log.info("-------要输出日志的内容--------");
    }

    /*private static Logger logger = LoggerFactory.getLogger(LoggerController.class);
    @PostConstruct
    public void print() {
        System.out.println("打印日志!");
        logger.info("=====我是日志框架打印的日志=====");
        logger.error("我是error日志");
        logger.warn("我是warn日志");
        logger.info("我是info日志");
        logger.debug("我是debug日志");
        logger.trace("我是trace日志");
    }*/
}
